package UIFree
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.system.ApplicationDomain;
	import flash.system.LoaderContext;
	import flash.system.SecurityDomain;
	import flash.text.Font;

	public class uif_fontContent extends uif_content {
		
		private var _fontObject: Object;
		public function uif_fontContent(a_parent:Sprite, pathURL:String, fontName: String, a_onComplete:Function=null) {
			super(a_parent, pathURL + '/fc_' + fontName + '.swf', function(e: Event): void {
/*				
				var fontClass: Class = loadClassDefinition('fc_' + fontName);
				_fontObject = new fontClass();*/
				_fontObject = content;
				Font.registerFont(_fontObject[fontName]);
				if (a_onComplete != null) a_onComplete(e);
			}, new LoaderContext(false, ApplicationDomain.currentDomain, SecurityDomain.currentDomain));
		}
		
		public function get fontObject(): Object {
			return _fontObject;
		}
	}
}